/*
 * Copyright 2012 Mirella Esther da Silva
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


package com.mirella.alerts;

import java.util.List;

import android.annotation.TargetApi;
import android.os.Bundle;
import android.os.StrictMode;
import android.view.Menu;

import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;


/*
 * 				AlertUS Android Application
 * 
 * 	Collect information online about emergencies/alerts on a map. 
 *  (information source: NOAA's National Weather Service, web-site: http://www.weather.gov).  
 */

 /**  
  *  This class is the Main activity of the AlertUS Android application.
  */
@TargetApi(9)
public class AlertUS extends MapActivity {

	@Override
	protected boolean isRouteDisplayed() {
		return false;
	}

	@TargetApi(9)
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_alert_us);

		MapView mapView = (MapView) findViewById(R.id.mapview);
		mapView.setBuiltInZoomControls(true);
		
		AlertOverlayLoader loader = new AlertOverlayLoader(this, mapView.getOverlays());
		loader.loadAlerts();
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.activity_alert_us, menu);
		return true;
	}
	
}
